The invention relates generally to communicating content over a network, and more particularly but not exclusively to selectively determining whether to concatenate data into a packet based on a network and/or send-queue metric.
Nagle's algorithm concatenates data into a packet to modify a number of packets transmitted over a network. Nagle's algorithm concatenates data into a packet until an acknowledgement (ACK) is received or a predetermined amount of data is concatenated in the packet. Subsequently, the packet is enabled to be transmitted over the network. Nagle's algorithm, named after John Nagle is described in Request for Comments (RFC) 896 (available at http://www.faqs.org/rfcs/rfc896.html).
While the use of a concatenation may improve behavior for a network, such use may penalize high latency network connections. For example, a high latency network connection may delay the ACK message for the previous message sent, thereby delaying transmission of data. Alternatively, a network device may send a network packet as soon as it is available. This mode of operation, however, may result in many small packets being sent over the network connection, which may result in an unduly high load over the network connection. Therefore, there is a need in the industry to improve how network packets are managed. Thus, it is with respect to these considerations and others that the present invention has been made.